The use of video cameras is growing more popular every day. One application of video cameras is for surveillance. For example, a network of video camera may be arranged to monitor a scene. The video streams captured by the video cameras are typically encoded in the video cameras prior to being transmitted to another node in the network, such as a server or a client.
Video coding is usually subject to a trade-off between the bitrate of the stream of encoded video on the one hand, and the quality of the encoded video on the other hand. In a camera system, like the one described above, the video stream captured by a video camera is usually degraded by noise. Since the noise is expensive to code, without contributing to the quality of the video, the video stream is therefore preferably subject to noise filtering prior to encoding. Since modern codecs, such as codecs implementing the H.264 or H.265 standard, are much more sensitive to temporal noise than spatial noise, it is common practice to apply a temporal noise filter before encoding the video stream.
When there is no movement in the scene, temporal noise filtering is very effective in reducing the noise without introducing artefacts. For example, consider the situation where there is no movement in the scene between two consecutive frames of the video stream. In such a situation, the temporal noise is the only difference between the same pixel in the current and the previous frame, and a temporal filter will be efficient to reduce the noise without introducing artefacts. However, even if the temporal noise is reduced in such a pixel, there will still be fluctuations in the pixel value between consecutive frames of the video stream. These fluctuations contribute to the output bitrate in an undesired manner. In particular, temporal fluctuations in pixel values affect the encoding cost of inter-coded blocks. In more detail, if a pixel belongs to a block of pixels of the frame that will be inter-coded, i.e., where the encoding relies on predicting the value in the pixel from a previous frame, there will be a cost for encoding the pixel value as long as the pixel value has changed its value from the previous frame. However, if the pixel value instead had remained constant in relation to the previous frame, the pixel could have been encoded at no cost by merely referring to the pixel value of the previous frame. There is thus room for improvements.